package com.vip.database.config;

import com.baomidou.mybatisplus.core.config.GlobalConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: 分页插件配置
 * @Date: 2020/11/25 10:00
 * @Author: wp
 **/
@Configuration
@MapperScan(basePackages = {"com.vip.database.mapper"})
public class MybatisPlusConfig {

    /**
     * 自动填充功能
     * @return
     */
    @Bean
    public GlobalConfig globalConfig() {
        GlobalConfig globalConfig = new GlobalConfig();
        globalConfig.setMetaObjectHandler(new MyBatisPlusMetaHandler());
        return globalConfig;
    }
}
